<?php 
/**
 * 邮件发送类
 */
class Mail
{
	public static function send($tomail, $subject, $content)
	{
		$mail = new SaeMail();
		$option = array(
			'from' => Config::$MAIL['smtp_acct'],
			'cc'   => Config::$MAIL['smtp_acct'],
			'to'   => $tomail,
			'smtp_host' => Config::$MAIL['smtp_host'],
			'smtp_port' => Config::$MAIL['smtp_port'],
			'smtp_username' => Config::$MAIL['smtp_acct'],
			'smtp_password' => Config::$MAIL['smtp_pass'],
			'subject' => $subject,
			'content' => $content,
			'content_type' => 'html',
		);
		$mail->setOpt($option);
		$ret = $mail->send();
		if (false === $ret) {
			Util::log('SendMail Error:'. $mail->errno() .'ErrorMsg:'. $mail->errormsg());
		}
		return $ret;
	}
}